Optimal. Leaf size=168 \[ \frac {(2 A-B (p+3)) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c^2 f g (p+1) (p+3) (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}+\frac {(2 A-B (p+3)) (c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{c f g (p+3) (p+5)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.079, Rules used = {2859, 2672, 2671} \[ \frac {(2 A-B (p+3)) (c-c \sin (e+f x))^{-p-1} (g \cos (e+f x))^{p+1}}{c^2 f g (p+1) (p+3) (p+5)}+\frac {(A+B) (c-c \sin (e+f x))^{-p-3} (g \cos (e+f x))^{p+1}}{f g (p+5)}+\frac {(2 A-B (p+3)) (c-c \sin (e+f x))^{-p-2} (g \cos (e+f x))^{p+1}}{c f g (p+3) (p+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2671
Rule 2672
Rule 2859
Rubi steps
\begin {align*} \int (g \cos (e+f x))^p (A+B \sin (e+f x)) (c-c \sin (e+f x))^{-3-p} \, dx &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-3-p}}{f g (5+p)}+\frac {(2 A-B (3+p)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-2-p} \, dx}{c (5+p)}\\ &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-3-p}}{f g (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{c f g (3+p) (5+p)}+\frac {(2 A-B (3+p)) \int (g \cos (e+f x))^p (c-c \sin (e+f x))^{-1-p} \, dx}{c^2 (3+p) (5+p)}\\ &=\frac {(A+B) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-3-p}}{f g (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-2-p}}{c f g (3+p) (5+p)}+\frac {(2 A-B (3+p)) (g \cos (e+f x))^{1+p} (c-c \sin (e+f x))^{-1-p}}{c^2 f g (1+p) (3+p) (5+p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.30, size = 119, normalized size = 0.71 \[ -\frac {\cos (e+f x) (c-c \sin (e+f x))^{-p} (g \cos (e+f x))^p \left ((2 A-B (p+3)) \sin ^2(e+f x)+(p+3) (B (p+3)-2 A) \sin (e+f x)+A \left (p^2+6 p+7\right )-B (p+3)\right )}{c^3 f (p+1) (p+3) (p+5) (\sin (e+f x)-1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.75, size = 131, normalized size = 0.78 \[ \frac {{\left ({\left (B p - 2 \, A + 3 \, B\right )} \cos \left (f x + e\right )^{3} + {\left (B p^{2} - 2 \, {\left (A - 3 \, B\right )} p - 6 \, A + 9 \, B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (A p^{2} + 2 \, {\left (3 \, A - B\right )} p + 9 \, A - 6 \, B\right )} \cos \left (f x + e\right )\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3}}{f p^{3} + 9 \, f p^{2} + 23 \, f p + 15 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 8.20, size = 0, normalized size = 0.00 \[ \int \left (g \cos \left (f x +e \right )\right )^{p} \left (A +B \sin \left (f x +e \right )\right ) \left (c -c \sin \left (f x +e \right )\right )^{-3-p}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \sin \left (f x + e\right ) + A\right )} \left (g \cos \left (f x + e\right )\right )^{p} {\left (-c \sin \left (f x + e\right ) + c\right )}^{-p - 3}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.94, size = 234, normalized size = 1.39 \[ -\frac {{\left (g\,\cos \left (e+f\,x\right )\right )}^p\,\left (30\,A\,\cos \left (e+f\,x\right )-15\,B\,\cos \left (e+f\,x\right )-2\,A\,\cos \left (3\,e+3\,f\,x\right )+3\,B\,\cos \left (3\,e+3\,f\,x\right )-12\,A\,\sin \left (2\,e+2\,f\,x\right )+18\,B\,\sin \left (2\,e+2\,f\,x\right )+2\,B\,p^2\,\sin \left (2\,e+2\,f\,x\right )+24\,A\,p\,\cos \left (e+f\,x\right )-5\,B\,p\,\cos \left (e+f\,x\right )+4\,A\,p^2\,\cos \left (e+f\,x\right )+B\,p\,\cos \left (3\,e+3\,f\,x\right )-4\,A\,p\,\sin \left (2\,e+2\,f\,x\right )+12\,B\,p\,\sin \left (2\,e+2\,f\,x\right )\right )}{c^3\,f\,{\left (-c\,\left (\sin \left (e+f\,x\right )-1\right )\right )}^p\,\left (p^3+9\,p^2+23\,p+15\right )\,\left (15\,\sin \left (e+f\,x\right )+6\,\cos \left (2\,e+2\,f\,x\right )-\sin \left (3\,e+3\,f\,x\right )-10\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________